<?php

// seo_title_symbol:           this.seo_title_symbol,
// seo_liststitle_format:      this.seo_liststitle_format,
// seo_viewtitle_format:       this.seo_viewtitle_format

require 'database.php';



$__CONFIG__=file_get_contents('config/config.json');

$__CONFIG__=json_decode($__CONFIG__,1);

$__CONFIG__["seo_title_symbol"]         =$_POST["seo_title_symbol"];
$__CONFIG__["seo_liststitle_format"]    =$_POST["seo_liststitle_format"];
$__CONFIG__["seo_viewtitle_format"]     =$_POST["seo_viewtitle_format"];



$json=json_encode($__CONFIG__,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);

$f=file_put_contents('config/config.json',$json);

if($f){
    return json([
        "code"=>200    
    ]);
}else{
    return json([
        "code"=>-1   
    ]);
}
